//
//  RBAddHorizontal.h
//  zhongzhenglu
//
//  Created by XL on 2022/7/12.
//

#import <UIKit/UIKit.h>

@interface UIScrollView(RBAddHorizontal)

/**
 最先调用,设置高度,同时移除用以下代码添加的所有子视图
 */
- (void)h_rbSetContentHeight: (CGFloat)height;

/**
 ---横排工具---
 布局规则同autolayout
 */
- (void)h_addView: (UIView *)view
     withHeight: (CGFloat)height
          width: (CGFloat)width
            top: (CGFloat)top
         bottom: (CGFloat)bottom
           left: (CGFloat)left
          right: (CGFloat)right
        centerY: (BOOL)centerY;

#pragma mark - 扩展方法

/**
 beforeView和afterView赋值一个即可
 都不赋值,作用同addView:xxxxxxxxx
 */
- (void)h_insertView: (UIView *)view
        beforeView: (UIView *)beforeView
         afterView: (UIView *)afterView
        withHeight: (CGFloat)height
             width: (CGFloat)width
               top: (CGFloat)top
            bottom: (CGFloat)bottom
              left: (CGFloat)left
             right: (CGFloat)right
           centerY: (BOOL)centerY;

/**
 移除一个view,移除后占位空间为padding
 */
- (void)h_removeView: (UIView *)view withPadding: (CGFloat)padding;

@end


